<?php 

	//明星推荐列表
	$ret = DR('components/star.get', 'g/300', $mod['param']);
	$rs  = &$ret['rst'];
	if ($ret['errno']) {
		return;
	}
	
?>

<div class="fame-list">
    <div class="column-title">
        <h3><?php echo F('escape', $mod['title']);?></h3>
    </div>
	<div class="column-body">
	
<?php
	
	//关注列表
	$uid = USER::uid();
	if ($uid) {
		 $flRet = DR('xweibo/xwb.getFriendIds', 'g2/300', null, $uid, null, null, null, 2000);
		 $flw   = $flRet['errno'] == 0 ? $flRet['rst']: array();
	}
	
	foreach ($rs as $star) {
		$star['uid'] = isset($star['uid']) ? $star['uid'] : $star['id'];
		$star['nickname'] = isset($star['screen_name']) ? $star['screen_name'] : $star['nickname'];
		$user_img = isset($star['profile_image_url']) ? F('profile_image_url', $star['profile_image_url']) : F('profile_image_url', $star['uid']);
		$remark = isset($star['remark']) ? F('escape', $star['remark']) : '';

		//判断用户是否已经关注明星
		$isFlw = $uid ? in_array($star['uid'], $flw['ids']): false;
		$nick = F('escape', $star['nickname']);
		$profile_url = URL('ta', array('id' => $star['uid']));

?>
        <div class="column-item" rel="u:<?php echo $star['uid'];?>">
            <div class="item-pic">
                <a href="<?php echo $profile_url;?>" class="user-pic"><img src="<?php echo $user_img;?>" alt="<?php echo $nick;?>的头像" /></a>
<?php if ($uid != $star['uid']):?>
			<?php if (!$isFlw):?>
                <a class="skin-bg addfollow-btn" rel="e:fl" href="javascript:;">加关注</a> 
			<?php else:?>
				<span class="followed-btn">已关注</span>
			<?php endif;?>
<?php endif;?>
            </div>                            
            <a href="<?php echo $profile_url;?>" class="nick"><?php echo $nick;?></a>
            <span class="info"><?php echo $remark;?></span>
        </div>
<?php
	}
?>
	</div>
</div>
